Xceed Real-Time Zip for .NET Documentation
Xceed.Zip Assembly / Xceed.Zip.ReaderWriter Namespace / ZipWriter Class / WriteItemData Method / WriteItemData(Stream,Byte[]) Method
A System.IO.Stream object.
An array of System.Byte to be used as the buffer in the data copy loop from itemData to ZipWriter.


In This Topic
    WriteItemData(Stream,Byte[]) Method
    In This Topic
    Writes the entire contents of a stream to the ZipWriter object's stream.
    Syntax
    'Declaration
     
    Public Overloads Function WriteItemData( _
       ByVal itemData As Stream, _
       ByVal buffer() As Byte _
    ) As Long
    'Usage
     
    Dim instance As ZipWriter
    Dim itemData As Stream
    Dim buffer() As Byte
    Dim value As Long
     
    value = instance.WriteItemData(itemData, buffer)
    public long WriteItemData( 
       Stream itemData,
       byte[] buffer
    )

    Parameters

    itemData
    A System.IO.Stream object.
    buffer
    An array of System.Byte to be used as the buffer in the data copy loop from itemData to ZipWriter.

    Return Value

    Returns the total amount of bytes read from the specified System.IO.Stream.
    Remarks

    This method allows you to supply your own buffer for the loop that drives the copy operation from the specified System.IO.Stream to ZipWriter. It prevents ZipWriter from allocating a temporary buffer to perform copy loop.

    The specified stream must support reading. It is not necessary for the stream to support seeking or writing. The specified stream is read to using the specified buffer until the end of the itemData is reached.

    The method does not close specified stream.

    The entire space of buffer will be used to read itemData.

    This method is equivalent to calling the WriteItemData(Stream,Byte[],Int32,Int32) Method with 0 and buffer.Length as parameter values.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also